﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.WebPages.Html;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace VaccineEbook.Common
{
    public class AccountModel
    {
        public class RegisterModel
        {
            [Required(ErrorMessage = "Email can't null", AllowEmptyStrings = false)]
            [Display(Name = "Email")]                        
            [RegularExpression("^[a-zA-Z0-9_\\.-]+@([a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}$", ErrorMessage = "E-mail is not valid")]
            public string Email { get; set; }

            [Required]
            [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
            [DataType(DataType.Password)]
            [Display(Name = "Password")]
            public string Password { get; set; }

            [DataType(DataType.Password)]
            [Display(Name = "Confirm password")]
            [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
            public string ConfirmPassword { get; set; }

            [Required(ErrorMessage = "Captcha can't null")]
            [Display(Name = "Let's math")]
            public string Captcha { get; set; }
        }

        public class LoginModel
        {
            [Required(ErrorMessage = "Please provide Email", AllowEmptyStrings = false)]
            [Display(Name = "Email")]
            [RegularExpression("^[a-zA-Z0-9_\\.-]+@([a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}$", ErrorMessage = "E-mail is not valid")]            
            public string Email { get; set; }

            [Required]
            [DataType(DataType.Password)]
            [Display(Name = "Password")]
            public string Password { get; set; }

            [Display(Name = "Remember me")]
            public bool RememberMe { get; set; }
        }

        public class ChangePasswordModel
        {
            [Required]
            [DataType(DataType.Password)]
            [Display(Name = "Current password")]
            public string OldPassword { get; set; }

            [Required]
            [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
            [DataType(DataType.Password)]
            [Display(Name = "New password")]
            public string NewPassword { get; set; }

            [DataType(DataType.Password)]
            [Display(Name = "Confirm new password")]
            [Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
            public string ConfirmNewPassword { get; set; }
        }



    }

    public class MobileModel
    {
        public class Register
        {

            [Required(ErrorMessage = "Email can't null", AllowEmptyStrings = false)]
            [Display(Name = "Email")]
            [RegularExpression("^[a-zA-Z0-9_\\.-]+@([a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}$", ErrorMessage = "E-mail is not valid")]            
            public string UserName { get; set; }

            [Required]
            [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 3)]
            [DataType(DataType.Password)]
            [Display(Name = "Password")]
            public string Password { get; set; }

            [DataType(DataType.Password)]
            [Display(Name = "Confirm password")]
            [Compare("Password", ErrorMessage = "The new password and confirmation password do not match.")]
            public string ConfirmPassword { get; set; }
        }
        public class Login
        {
            [Required(ErrorMessage = "Please provide Email", AllowEmptyStrings = false), MaxLength(50)]
            [DataType(DataType.EmailAddress)]
            public string UserName { get; set; }
            [Required(ErrorMessage = "Please provide Password", AllowEmptyStrings = false), MaxLength(50)]
            [DataType(DataType.Password)]
            public string Password { get; set; }           
            public string AppVersion { get; set; }            
        }

        public class CreateVaccineRecord
        {
            [Display(Name = "VaccineName")]
        //    [StringLength(200, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 1)]
            public string VaccineName { get; set; }                     
            
            [Display(Name = "DiseaseName")]
          //  [StringLength(200, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 1)]
            public string DiseaseName { get; set; }

            [DataType(DataType.DateTime)]
            [Display(Name = "Date")]            
            public DateTime Date { get; set; }

            [Display(Name = "HadDisease")]
            public bool HadDisease { get; set; }

            [Display(Name = "Note")]
         //   [StringLength(200, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength =1)]
            public string Note { get; set; }

            [Display(Name = "UserID")]
       //     [StringLength(200, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 1)]
            public int UserID { get; set; }
        }

        public class Result
        {
            public string Status { get; set; }
            public string Id { get; set; }
            public string Uuid { get; set; }
            public string DeviceId { get; set; }
            public string Message { get; set; }
        }
    }
  
}